Integrand size = 23, antiderivative size = 77 \[ \int \frac {\sec ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {(a+b) \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2} d}-\frac {(a-b) \tan (c+d x)}{2 a b d \left (a+b \tan ^2(c+d x)\right )} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3756, 393, 211} \[ \int \frac {\sec ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {(a+b) \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2} d}-\frac {(a-b) \tan (c+d x)}{2 a b d \left (a+b \tan ^2(c+d x)\right )} \]
[In]
[Out]
Rule 211
Rule 393
Rule 3756
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1+x^2}{\left (a+b x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{d} \\ & = -\frac {(a-b) \tan (c+d x)}{2 a b d \left (a+b \tan ^2(c+d x)\right )}+\frac {(a+b) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (c+d x)\right )}{2 a b d} \\ & = \frac {(a+b) \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2} d}-\frac {(a-b) \tan (c+d x)}{2 a b d \left (a+b \tan ^2(c+d x)\right )} \\ \end{align*}
Time = 0.87 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.08 \[ \int \frac {\sec ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {(a+b) \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )+\frac {\sqrt {a} \sqrt {b} (-a+b) \sin (2 (c+d x))}{a+b+(a-b) \cos (2 (c+d x))}}{2 a^{3/2} b^{3/2} d} \]
[In]
[Out]
Time = 9.35 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.90
method | result | size |
derivativedivides | \(\frac {-\frac {\left (a -b \right ) \tan \left (d x +c \right )}{2 a b \left (a +b \tan \left (d x +c \right )^{2}\right )}+\frac {\left (a +b \right ) \arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a b \sqrt {a b}}}{d}\) | \(69\) |
default | \(\frac {-\frac {\left (a -b \right ) \tan \left (d x +c \right )}{2 a b \left (a +b \tan \left (d x +c \right )^{2}\right )}+\frac {\left (a +b \right ) \arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a b \sqrt {a b}}}{d}\) | \(69\) |
risch | \(-\frac {i \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+a -b \right )}{a b d \left (a \,{\mathrm e}^{4 i \left (d x +c \right )}-b \,{\mathrm e}^{4 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+a -b \right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a b +\sqrt {-a b}\, a +\sqrt {-a b}\, b}{\left (a -b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d b}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a b +\sqrt {-a b}\, a +\sqrt {-a b}\, b}{\left (a -b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d a}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i a b -\sqrt {-a b}\, a -\sqrt {-a b}\, b}{\left (a -b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d b}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i a b -\sqrt {-a b}\, a -\sqrt {-a b}\, b}{\left (a -b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d a}\) | \(345\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 143 vs. \(2 (65) = 130\).
Time = 0.31 (sec) , antiderivative size = 367, normalized size of antiderivative = 4.77 \[ \int \frac {\sec ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\left [-\frac {4 \, {\left (a^{2} b - a b^{2}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left ({\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + a b + b^{2}\right )} \sqrt {-a b} \log \left (\frac {{\left (a^{2} + 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cos \left (d x + c\right )^{3} - b \cos \left (d x + c\right )\right )} \sqrt {-a b} \sin \left (d x + c\right ) + b^{2}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right )}{8 \, {\left (a^{2} b^{3} d + {\left (a^{3} b^{2} - a^{2} b^{3}\right )} d \cos \left (d x + c\right )^{2}\right )}}, -\frac {2 \, {\left (a^{2} b - a b^{2}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left ({\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + a b + b^{2}\right )} \sqrt {a b} \arctan \left (\frac {{\left ({\left (a + b\right )} \cos \left (d x + c\right )^{2} - b\right )} \sqrt {a b}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{4 \, {\left (a^{2} b^{3} d + {\left (a^{3} b^{2} - a^{2} b^{3}\right )} d \cos \left (d x + c\right )^{2}\right )}}\right ] \]
[In]
[Out]
\[ \int \frac {\sec ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\int \frac {\sec ^{4}{\left (c + d x \right )}}{\left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2}}\, dx \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.90 \[ \int \frac {\sec ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=-\frac {\frac {{\left (a - b\right )} \tan \left (d x + c\right )}{a b^{2} \tan \left (d x + c\right )^{2} + a^{2} b} - \frac {{\left (a + b\right )} \arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a b}}{2 \, d} \]
[In]
[Out]
none
Time = 0.59 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.19 \[ \int \frac {\sec ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\frac {{\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )\right )} {\left (a + b\right )}}{\sqrt {a b} a b} - \frac {a \tan \left (d x + c\right ) - b \tan \left (d x + c\right )}{{\left (b \tan \left (d x + c\right )^{2} + a\right )} a b}}{2 \, d} \]
[In]
[Out]
Time = 11.76 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.84 \[ \int \frac {\sec ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\mathrm {tan}\left (c+d\,x\right )}{\sqrt {a}}\right )\,\left (a+b\right )}{2\,a^{3/2}\,b^{3/2}\,d}-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (a-b\right )}{2\,a\,b\,d\,\left (b\,{\mathrm {tan}\left (c+d\,x\right )}^2+a\right )} \]
[In]
[Out]